const Service = require('egg').Service;

class userService extends Service {
  async getuser(name) {
    const user = await this.app.mysql.get('user',{
        name
    })
    return user;
  }
  async registry(name,pwd) {
    const user = await this.app.mysql.insert('user',{
        name,pwd
    })
    return user;
  }
  async login(name,pwd){
    const user = await this.app.mysql.select('user',{
        name,pwd
    })
    return user;
  }
}

module.exports = userService;